package lab03.Test01;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * Created by lenovo on 2017/11/16.
 */
public class FileOutputStreamTest {
    public FileOutputStreamTest(String path) {
    }

    public static void main(String[] args) throws IOException {
        String path="D:\\Hello.txt";
        BufferedWriter writer=null;
        try{
        writer=new BufferedWriter(new FileWriter(path));
        writer.write("hello,world");
        writer.newLine();
        writer.write("01010101");
        writer.newLine();
        writer.write("bye！！！");
        }catch(IOException e){
        e.printStackTrace();
        }finally{
            try {
                writer.close();
            }catch (IOException e){
                
            }
        }
    }
    
}
